<template>
  <div id="xuanze" class="col-center">
    <div data-aos="fade-up" class="title">典雅多彩，颜值出色</div>
    <div data-aos="fade-up" class="sub">静谧深邃的至尊黑，纯洁典雅的皓月银， 尽显奢华的荣耀金，柔情似水珊瑚红，梦幻科技幻影蓝，五种经典搭配，五抹亮丽风景</div>

    <div data-aos="fade-up" class="margin-tb list">
      <img src="@/assets/images/kj1.png" :class="{ on: active==1 }" @click="cgActive(1)" alt />
      <img src="@/assets/images/kj2.png" :class="{ on: active==2 }" @click="cgActive(2)" alt />
      <img src="@/assets/images/kj3.png" :class="{ on: active==3 }" @click="cgActive(3)" alt />
      <img src="@/assets/images/kj4.png" :class="{ on: active==4 }" @click="cgActive(4)" alt />
      <img src="@/assets/images/kj5.png" :class="{ on: active==5 }" @click="cgActive(5)" alt />
    </div>

    <div class="btns">
      <div class="btn" @click="active=1">
        <div class="outcc">
          <div class="incc" style="background: #FF8089"></div>
        </div>
        <div class="text">珊瑚红</div>
      </div>
      <div class="btn" @click="active=2">
        <div class="outcc">
          <div class="incc" style="background: #FFC069"></div>
        </div>
        <div class="text">荣耀金</div>
      </div>
      <div class="btn" @click="active=3">
        <div class="outcc">
          <div class="incc" style="background: #BFBFBF"></div>
        </div>
        <div class="text">皓月银</div>
      </div>
      <div class="btn" @click="active=4">
        <div class="outcc">
          <div class="incc" style="background: #000000"></div>
        </div>
        <div class="text">至尊黑</div>
      </div>
      <div class="btn" @click="active=5">
        <div class="outcc">
          <div class="incc" style="background: #54CBFF"></div>
        </div>
        <div class="text">幻影蓝</div>
      </div>
    </div>

    <div data-aos="fade-up" class="title">人人云1.0详细参数</div>
    <div data-aos="fade-up" class="sub">万物皆可挖 EPOC时代领风者</div>

    <img data-aos="fade-up" class="margin-tb table" src="@/assets/images/table2.png" alt />

    <img data-aos="zoom-in" src="@/assets/images/kj6.png" class="btm" alt />
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 1
    };
  },
  methods: {
    cgActive(idx) {
      if (this.active == idx) {
        this.active = 0
      } else {
        this.active = idx
      }
    }
  }
};
</script>

<style lang="scss" scoped>
#xuanze {
  background-image: url("../assets/images/xzbg.png");
  background-size: 100%;
  background-repeat: no-repeat;
  margin-bottom: 20%;
  padding-top: 30%;
  padding-bottom: 10%;
  position: relative;
  .title {
    margin-top: 20px;
    height: 21px;
    font-size: 16px;
    font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
    font-weight: bold;
    color: rgba(255, 255, 255, 1);
    line-height: 21px;
    letter-spacing: 1px;
  }
  .sub {
    margin-top: 20px;
    max-width: 255px;
    text-align: center;
    font-size: 11px;
    font-family: MicrosoftYaHei;
    color: rgba(153, 153, 153, 1);
    line-height: 15px;
  }
}
.list {
  position: relative;
  width: 60%;
  margin-top: 60px;
  padding-bottom: 120px;
  transform: translateX(-10%);
  > img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9;
    transition: all 0.3s;
    transform: translateX(-20%);
    &:nth-of-type(1) {
      left: 0;
      z-index: 9;
    }
    &:nth-of-type(2) {
      left: 20%;
      z-index: 8;
    }
    &:nth-of-type(3) {
      left: 38%;
      z-index: 7;
    }
    &:nth-of-type(4) {
      left: 56%;
      z-index: 6;
    }
    &:nth-of-type(5) {
      left: 80%;
      z-index: 5;
    }
    &.on {
      top: -15%;
    }
  }
}
.btns {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  width: 60%;
}
.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  .text {
    margin-top: 12px;
    width: 39px;
    height: 16px;
    font-size: 12px;
    font-family: MicrosoftYaHei;
    color: rgba(255, 255, 255, 1);
    line-height: 16px;
  }
  .outcc {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
  }
  .incc {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }
}
.table {
  height: 440px;
}
.btm {
  position: absolute;
  bottom: 0;
  transform: translateY(70%) !important;
}
@media screen and (max-width: 360px) {
  .table {
    height: 320px;
  }
}
</style>